/**
 * Copyright
 */
package org.sevaapp.domain;

import javax.persistence.CascadeType;
import javax.persistence.FetchType;
import javax.persistence.JoinColumn;
import javax.persistence.MappedSuperclass;
import javax.persistence.GeneratedValue;
import javax.persistence.GenerationType;
import javax.persistence.Id;
import javax.persistence.OneToOne;
import javax.persistence.Temporal;
import javax.persistence.TemporalType;
import javax.persistence.Transient;

import org.apache.commons.logging.Log;
import org.apache.commons.logging.LogFactory;

import org.springframework.beans.factory.annotation.Autowired;

import org.sevaapp.dao.PhysicianDao;
import org.sevaapp.dao.DaoException;

/**
 *  THIS IS A CODE GENERATED FILE. DO NOT EDIT.
 */

@MappedSuperclass
public abstract class BasePhysician extends BaseDomainObject {

	private static final Log log = LogFactory.getLog(BasePhysician.class);

	@Id
	@GeneratedValue(strategy = GenerationType.AUTO)
	private Integer id;

	public void setId(Integer id) {
		this.id = id;
	}

	public Integer getId() {
		return id;
	}

	private String firstName;

	public void setFirstName(String firstName) {
		this.firstName = firstName;
	}

	public String getFirstName() {
		return firstName;
	}

	private String middleName;

	public void setMiddleName(String middleName) {
		this.middleName = middleName;
	}

	public String getMiddleName() {
		return middleName;
	}

	private String lastName;

	public void setLastName(String lastName) {
		this.lastName = lastName;
	}

	public String getLastName() {
		return lastName;
	}

	private String address1;
	private String address2;
	private String city;
	private String state;
	private int		zip;
	
	private String secAddress1;
	private String secAddress2;
	private String secCity;
	private String secState;
	private int	   secZip;

	public String getAddress1() {
		return address1;
	}

	public void setAddress1(String address1) {
		this.address1 = address1;
	}

	public String getAddress2() {
		return address2;
	}

	public void setAddress2(String address2) {
		this.address2 = address2;
	}

	public String getCity() {
		return city;
	}

	public void setCity(String city) {
		this.city = city;
	}

	public String getState() {
		return state;
	}

	public void setState(String state) {
		this.state = state;
	}

	public int getZip() {
		return zip;
	}

	public void setZip(int zip) {
		this.zip = zip;
	}

	public String getSecAddress1() {
		return secAddress1;
	}

	public void setSecAddress1(String secAddress1) {
		this.secAddress1 = secAddress1;
	}

	public String getSecAddress2() {
		return secAddress2;
	}

	public void setSecAddress2(String secAddress2) {
		this.secAddress2 = secAddress2;
	}

	public String getSecCity() {
		return secCity;
	}

	public void setSecCity(String secCity) {
		this.secCity = secCity;
	}

	public String getSecState() {
		return secState;
	}

	public void setSecState(String secState) {
		this.secState = secState;
	}

	public int getSecZip() {
		return secZip;
	}

	public void setSecZip(int secZip) {
		this.secZip = secZip;
	}

	private String phone;

	public void setPhone(String phone) {
		this.phone = phone;
	}

	public String getPhone() {
		return phone;
	}

	private String email;

	public void setEmail(String email) {
		this.email = email;
	}

	public String getEmail() {
		return email;
	}

	private String faxNumber;

	public void setFaxNumber(String faxNumber) {
		this.faxNumber = faxNumber;
	}

	public String getFaxNumber() {
		return faxNumber;
	}

	private String officeContact1;

	public void setOfficeContact1(String officeContact1) {
		this.officeContact1 = officeContact1;
	}

	public String getOfficeContact1() {
		return officeContact1;
	}

//	private Address address2;
//
//	public void setAddress2(Address address2) {
//		this.address2 = address2;
//	}
//
//	public Address getAddress2() {
//		return address2;
//	}

	private String officeContact2;

	public void setOfficeContact2(String officeContact2) {
		this.officeContact2 = officeContact2;
	}

	public String getOfficeContact2() {
		return officeContact2;
	}

	private String speciality;

	public void setSpeciality(String speciality) {
		this.speciality = speciality;
	}

	public String getSpeciality() {
		return speciality;
	}

	private String degree;

	public void setDegree(String degree) {
		this.degree = degree;
	}

	public String getDegree() {
		return degree;
	}

	private Integer yearsOfExperience;

	public void setYearsOfExperience(Integer yearsOfExperience) {
		this.yearsOfExperience = yearsOfExperience;
	}

	public Integer getYearsOfExperience() {
		return yearsOfExperience;
	}

	private Integer monthlyCommitment;

	public void setMonthlyCommitment(Integer monthlyCommitment) {
		this.monthlyCommitment = monthlyCommitment;
	}

	public Integer getMonthlyCommitment() {
		return monthlyCommitment;
	}

	private int remainingResources;
	
	public int getRemainingResources() {
		return remainingResources;
	}

	public void setRemainingResources(int remainingResources) {
		this.remainingResources = remainingResources;
	}
	
	private Integer subsidizedTest;

	public void setSubsidizedTest(Integer subsidizedTest) {
		this.subsidizedTest = subsidizedTest;
	}

	public Integer getSubsidizedTest() {
		return subsidizedTest;
	}

	private java.util.ArrayList<String> servicesProvided;

	public void setServicesProvided(java.util.ArrayList<String> servicesProvided) {
		this.servicesProvided = servicesProvided;
	}

	public java.util.ArrayList<String> getServicesProvided() {
		return servicesProvided;
	}

	private java.util.ArrayList<String> labServices;

	public void setLabServices(java.util.ArrayList<String> labServices) {
		this.labServices = labServices;
	}

	public java.util.ArrayList<String> getLabServices() {
		return labServices;
	}

	private String registrationId;

	public void setRegistrationId(String registrationId) {
		this.registrationId = registrationId;
	}

	public String getRegistrationId() {
		return registrationId;
	}

	@Autowired
	@Transient
	private PhysicianDao dao;

	// CRUD Methods
	public void add(Physician physicianData) {
		log.debug("add(domainData) method called.");
		try {
			dao.add(physicianData);
		} catch (DaoException ex) {
			ex.printStackTrace();
		}
	}

	public void add() {
		log.debug("add() method called.");
		try {
			dao.add((Physician) this);
		} catch (DaoException ex) {
			ex.printStackTrace();
		}
	}

	public void delete(Integer id) {
		log.debug("delete() method called.");
		try {
			dao.delete(id);
		} catch (DaoException ex) {
			ex.printStackTrace();
		}
	}

	public void update(Physician domainObject) {
		log.debug("update() method called.");
		try {
			dao.update(domainObject);
		} catch (DaoException ex) {
			ex.printStackTrace();
		}
	}

	public Physician load(Integer id) {
		log.debug("load() method called.");
		Physician newDomainObj = null;
		try {
			newDomainObj = dao.load(id);
		} catch (DaoException ex) {
			ex.printStackTrace();
		}
		return newDomainObj;
	}

}
